<?php
/*********************/
/*                   */
/*  模板模块         */
/*   BY voiet        */
/*   2009-8-8       */
/*                   */
/*********************/

//require_once( CORE_DIR."/model/content/mdl.template.php" );
class cmd_template extends mdl_template
{



	function getname( )
	{
		$ctl = array(
			"index" => __( "首页" ),
			"gallery" => __( "商品列表页" ),
			"product" => __( "商品详细页" ),
			"page" => __( "站点栏目单独页" ),
			"artlist" => __( "文章列表页" ),
			"article" => __( "文章页" ),
			"event" => __( "活动页" ),
			"eventdetail" => __( "活动详细页" ),
			"modellist" => __( "模特列表页" ),
			"modeldetail" => __( "模特详细页" ),
			"unartlist" => __( "联盟公告列表页" ),
			"unarticle" => __( "联盟公告详细页" ),
			"auclist" => __( "拍卖列表页" ),
			"auction" => __( "拍卖详细页" ),
			"youhui" => __( "优惠页" ),
			"union" => __( "联盟页" ),
			"domo" => __( "DOMO页" ),
			"photolist" => __( "照片列表页" ),
			"photodetail" => __( "照片详细页" ),
			"modeldaily" => __( "模特页" ),
			"brand" => __( "品牌展示页" ),
			"gift" => __( "赠品页" ),
			"cart" => __( "购物车页" ),
			"comment" => __( "商品评论/咨询页" ),
			"member" => __( "会员中心页" ),
			"passport" => __( "注册/登录页" ),
			"search" => __( "高级搜索页" ),
			"package" => __( "捆绑商品页" ),
			"default" => __( "默认页" )	
		);
		return $ctl;
	}

	function templatelist( $theme )
	{
		include( "shopctls.php" );
		$ctl = $this->getname( );
		foreach ( $ctl as $c => $a )
		{
			if ( $ctl[$c] )
			{
				$item = array(
					"name" => $ctl[$c],
					"items" => array( ),
					"file" => $file = $c.".html",
					"available" => file_exists( THEME_DIR."/".$theme."/".$file )
				);
				foreach ( $a as $act => $i )
				{
					$item['items'][] = array_merge( array(
						"act" => $act,
						"file" => $file = $c."-".$act.".html",
						"available" => file_exists( THEME_DIR."/".$theme."/".$file )
					), $i );
				}
				$data[] = $item;
			}
		}
		return $data;
	}

	

}

?>